More splitting of testo cases.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 15 Jul 2013 16:37:02 +0000 (16:37 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 15 Jul 2013 16:37:02 +0000 (16:37 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4435 f51c46e8-681c-474f-0cfe-069cfd0219fb

21 files changed:
gpsbabel/testo.d/an1.test [new file with mode: 0644]
gpsbabel/testo.d/bcr.test [new file with mode: 0644]
gpsbabel/testo.d/classic-1.test
gpsbabel/testo.d/classic-2.test
gpsbabel/testo.d/classic-3.test
gpsbabel/testo.d/classic-4.test
gpsbabel/testo.d/dmtlog.test [new file with mode: 0644]
gpsbabel/testo.d/enigma.test [new file with mode: 0644]
gpsbabel/testo.d/gpspilot.test [new file with mode: 0644]
gpsbabel/testo.d/holux.test [new file with mode: 0644]
gpsbabel/testo.d/hsandv.test [new file with mode: 0644]
gpsbabel/testo.d/magellan_sd.test [new file with mode: 0644]
gpsbabel/testo.d/mapsend.test
gpsbabel/testo.d/mapsource.test [new file with mode: 0644]
gpsbabel/testo.d/msroute.test [new file with mode: 0644]
gpsbabel/testo.d/route_reverse.test [new file with mode: 0644]
gpsbabel/testo.d/stackfilter.test [new file with mode: 0644]
gpsbabel/testo.d/stmsdf.test [new file with mode: 0644]
gpsbabel/testo.d/tpg.test [new file with mode: 0644]
gpsbabel/testo.d/unicsv_grids.test [new file with mode: 0644]
gpsbabel/testo.d/xmapwpt.test [new file with mode: 0644]

diff --git a/gpsbabel/testo.d/an1.test b/gpsbabel/testo.d/an1.test
new file mode 100644 (file)
index 0000000..5e82bd7
--- /dev/null
@@ -0,0 +1,20 @@
+
+#
+# DeLorme .an1 tests
+#
+rm -f ${TMPDIR}/an1.out
+gpsbabel -i an1 -f ${REFERENCE}/foo.an1 -o csv -F ${TMPDIR}/an1.out
+compare ${REFERENCE}/an1-in.ref ${TMPDIR}/an1.out
+
+rm -f ${TMPDIR}/an1.out
+gpsbabel -i an1 -f ${REFERENCE}/foo.an1 -o an1 -F ${TMPDIR}/an1.out
+bincompare ${TMPDIR}/an1.out ${REFERENCE}/an1-an1.ref
+
+rm -f ${TMPDIR}/an1.out
+gpsbabel -i xmap -f ${REFERENCE}/xmap -o an1 -F ${TMPDIR}/an1.out
+bincompare ${TMPDIR}/an1.out ${REFERENCE}/an1-out.ref
+
+rm -f ${TMPDIR}/an1.out
+gpsbabel -i google -f ${REFERENCE}/google.js -o an1 -F ${TMPDIR}/an1.out
+bincompare ${TMPDIR}/an1.out ${REFERENCE}/an1-line-out.ref
+
diff --git a/gpsbabel/testo.d/bcr.test b/gpsbabel/testo.d/bcr.test
new file mode 100644 (file)
index 0000000..3950e48
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# Map&Guide Motorrad Routenplaner .bcr files test
+#
+rm -f ${TMPDIR}/bcr*
+gpsbabel -r -i bcr -f ${REFERENCE}/route/bcr-sample.bcr -o gpx -F ${TMPDIR}/bcr-sample.gpx
+compare ${REFERENCE}/route/bcr-sample.gpx ${TMPDIR}/bcr-sample.gpx
+gpsbabel -r -i gpx -f ${REFERENCE}/route/bcr-sample.gpx -o bcr -F ${TMPDIR}/bcr-sample2.bcr
+compare ${REFERENCE}/route/bcr-sample2.bcr ${TMPDIR}/bcr-sample2.bcr
+gpsbabel -r -i bcr -f ${TMPDIR}/bcr-sample2.bcr -o gpx -F ${TMPDIR}/bcr-sample2.gpx
+compare        ${REFERENCE}/route/bcr-sample.gpx ${TMPDIR}/bcr-sample2.gpx
+
index a473772ea8dce0c79b794e4b518c6d7954a54242..1eb1ea0280304733540e84fa537dc5a81b2b9c46 100644 (file)
@@ -4,89 +4,6 @@
 # Magellan serial
 # TODO
 
-# TPG (NG Topo!) file format
-# This is hard to test as the datum conversions create minute
-# inconsistencies in the coordinates.  So..  we test our i/o 
-# against a format that rounds higher than we care to compare
-# for binary data. 
-rm -f ${TMPDIR}/topo.mxf ${TMPDIR}/tpg.mxf ${TMPDIR}/geo.tpg
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o tpg -F ${TMPDIR}/geo.tpg
-gpsbabel -i tpg -f ${TMPDIR}/geo.tpg -o mxf -F ${TMPDIR}/tpg.mxf
-gpsbabel -i tpg -f ${REFERENCE}/tpg.tpg -o mxf -F ${TMPDIR}/topo.mxf
-compare ${TMPDIR}/tpg.mxf ${TMPDIR}/topo.mxf
-
-# Holux support is a little funky to test.  Becuase it loses precision,
-# if we convert it to another format, we lose accuracy (rounding) in the
-# coords, so converting it so something else and comparing it never works.
-# So we verify that we can read the reference and write it and get an
-# identical reference.
-gpsbabel -i holux -f ${REFERENCE}/paris.wpo -o holux -F ${TMPDIR}/paris.wpo
-# compare ${REFERENCE}/paris.wpo ${TMPDIR}/paris.wpo
-
-# GPSPilot Tracker for PalmOS
-# This test is eerily similar to the NAV Companion test.  In fact, the 
-# converted reference file (magnavr.gpu) is identical.
-rm -f ${TMPDIR}/gpspilot.pdb ${TMPDIR}/gpspilot.gpu ${TMPDIR}/gpspil_t.gpu
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpspilot -F ${TMPDIR}/gpspilot.pdb
-gpsbabel -i gpspilot -f ${TMPDIR}/gpspilot.pdb -o gpsutil -F ${TMPDIR}/gpspilot.gpu
-gpsbabel -i gpspilot -f ${REFERENCE}/gpspilot.pdb -o gpsutil -F ${TMPDIR}/gpspil_t.gpu
-compare ${TMPDIR}/gpspil_t.gpu ${TMPDIR}/gpspilot.gpu
-compare ${REFERENCE}/gu.wpt ${TMPDIR}/gpspilot.gpu
-
-# XMapHH Street Atlas USA file format
-rm -f ${TMPDIR}/xmapwpt.wpt ${TMPDIR}/xmapwpt.xmapwpt
-gpsbabel -i xmapwpt -f ${REFERENCE}/xmapwpt.wpt -o xmapwpt -F ${TMPDIR}/xmapwpt.xmapwpt
-gpsbabel -i xmapwpt -f ${TMPDIR}/xmapwpt.xmapwpt -o xmapwpt -F ${TMPDIR}/xmapwpt.wpt
-compare ${TMPDIR}/xmapwpt.wpt ${REFERENCE}
-
-# Garmin Mapsource This is a binary format with some undocumented
-# fields.  This test is therefore intentionally vague.  We read a file,
-# convert it to GPX, then write a file as MPS, then read it back and
-# write it as GPX and compare them.  Since we're writing both GPX files
-# ourselves from the same version, we're immune to changes in our own
-# GPX output.
-
-rm -fr ${TMPDIR}/ms.gpx ${TMPDIR}/ms[12].gpx
-gpsbabel -i mapsource -f ${REFERENCE}/mapsource.mps  -o gpx -F ${TMPDIR}/ms1.gpx
-gpsbabel -i mapsource -f ${REFERENCE}/mapsource.mps  -o mapsource -F ${TMPDIR}/ms.mps
-gpsbabel -i mapsource -f ${TMPDIR}/ms.mps -o gpx -F ${TMPDIR}/ms2.gpx
-compare ${TMPDIR}/ms1.gpx ${TMPDIR}/ms2.gpx
-
-#
-# MRCB mapsource track test
-#
-rm -f ${TMPDIR}/mps-track.mps
-gpsbabel -t -i mapsource -f ${REFERENCE}/track/mps-track.mps -o mapsource,mpsverout=3 \
-         -F ${TMPDIR}/mps-track.mps
-compare ${TMPDIR}/mps-track.mps ${REFERENCE}/track
-
-# Now do a test of reading waypoints from a track-only file - should have an empty result
-rm -f ${TMPDIR}/mps-track.mps
-gpsbabel -i mapsource -f ${REFERENCE}/track/mps-track.mps -o mapsource,mpsverout=3 \
-         -F ${TMPDIR}/mps-track.mps
-compare ${REFERENCE}/mps-empty.mps ${TMPDIR}/mps-track.mps
-
-#
-# MRCB mapsource route test
-#
-rm -f ${TMPDIR}/mps-route.mps
-gpsbabel -r -i mapsource -f ${REFERENCE}/route/route.mps -o mapsource,mpsverout=4 \
-         -F ${TMPDIR}/mps-route.mps
-compare ${REFERENCE}/route/route.mps ${TMPDIR}/mps-route.mps
-
-# Now do a test of reading tracks from a route-only file - should have an empty result
-rm -f ${TMPDIR}/mps-route.mps
-gpsbabel -t -i mapsource -f ${REFERENCE}/route/route.mps -o mapsource,mpsverout=3 \
-         -F ${TMPDIR}/mps-route.mps
-compare ${REFERENCE}/mps-empty.mps ${TMPDIR}/mps-route.mps
-#
-# magellan SD card waypoint / route format
-#
-rm -f ${TMPDIR}/magellan.rte
-gpsbabel -r -i magellan -f ${REFERENCE}/route/magellan.rte -o magellan \
-         -F ${TMPDIR}/magellan.rte
-compare ${REFERENCE}/route/magellan.rte ${TMPDIR}/magellan.rte
-
 
 #
 # GPX routes -- since GPX contains a date stamp, tests will always
@@ -110,19 +27,3 @@ gpsbabel -t -i magellan -f ${REFERENCE}/track/meridian.trk -o gpx \
          -F ${TMPDIR}/maggpx.trk
 compare ${TMPDIR}/maggpx.trk ${TMPDIR}/gpxtrack.gpx
 
-#
-# MAPSEND waypoint / route format
-#
-rm -f ${TMPDIR}/route.mapsend
-gpsbabel -r -i mapsend -f ${REFERENCE}/route/route.mapsend -o mapsend \
-         -F ${TMPDIR}/route.mapsend
-bincompare ${TMPDIR}/route.mapsend ${REFERENCE}/route/route.mapsend
-
-#
-# MAPSEND track format 
-#
-rm -f ${TMPDIR}/mapsend.trk
-gpsbabel -t -i mapsend -f ${REFERENCE}/track/mapsend.trk -o mapsend,trkver=3 \
-         -F ${TMPDIR}/mapsend.trk
-compare ${TMPDIR}/mapsend.trk ${REFERENCE}/track/
-
index 424b14d0198ad5cbb04f353e83ff7f1f2937b4a0..207da68ee55e625cb4f2c5c78dda3e04047a8703 100644 (file)
@@ -1,50 +1,4 @@
 #!/bin/sh
-#
-# Route reversal filter.   Do it twice and be sure we get what we
-# started with.
-#
-rm -f ${TMPDIR}/reverse1.arc ${TMPDIR}/reverse2.arc ${TMPDIR}/reference.arc
-gpsbabel -r -i gpx -f ${REFERENCE}/route/route.gpx \
-         -o arc -F ${TMPDIR}/reference.arc
-gpsbabel -r -i gpx -f ${REFERENCE}/route/route.gpx \
-         -x reverse \
-         -o arc -F ${TMPDIR}/reverse1.arc
-gpsbabel -r -i gpx -f ${REFERENCE}/route/route.gpx \
-         -x reverse \
-         -x reverse \
-         -o arc -F ${TMPDIR}/reverse2.arc
-# Verify the first and last are the same
-compare ${TMPDIR}/reference.arc  ${TMPDIR}/reverse2.arc
-# Verify the first and second are different.
-#${DIFF}  ${TMPDIR}/reverse1.arc  ${TMPDIR}/reverse2.arc > /dev/null && {
-#              echo ERROR Failed reversal test.
-#              exit 1
-#}
-
-# parkrrrr: This isn't a straightforward compare; we *want* it to fail.
-# Obviously this test should just be rewritten with a new reference.
-#compare  ${TMPDIR}/reverse1.arc  ${TMPDIR}/reverse2.arc
-
-
-#
-# DeLorme .an1 tests
-#
-rm -f ${TMPDIR}/an1.out
-gpsbabel -i an1 -f ${REFERENCE}/foo.an1 -o csv -F ${TMPDIR}/an1.out
-compare ${REFERENCE}/an1-in.ref ${TMPDIR}/an1.out
-
-rm -f ${TMPDIR}/an1.out
-gpsbabel -i an1 -f ${REFERENCE}/foo.an1 -o an1 -F ${TMPDIR}/an1.out
-bincompare ${TMPDIR}/an1.out ${REFERENCE}/an1-an1.ref
-
-rm -f ${TMPDIR}/an1.out
-gpsbabel -i xmap -f ${REFERENCE}/xmap -o an1 -F ${TMPDIR}/an1.out
-bincompare ${TMPDIR}/an1.out ${REFERENCE}/an1-out.ref
-
-rm -f ${TMPDIR}/an1.out
-gpsbabel -i google -f ${REFERENCE}/google.js -o an1 -F ${TMPDIR}/an1.out
-bincompare ${TMPDIR}/an1.out ${REFERENCE}/an1-line-out.ref
-
 
 #
 # XCSV "human readable" tests
@@ -64,27 +18,6 @@ rm -f ${TMPDIR}/pathdist.out
 gpsbabel -i magellan -f ${REFERENCE}/dusky.trk -o xcsv,style=${REFERENCE}/gnuplot.style -F ${TMPDIR}/pathdist.out
 compare ${REFERENCE}/dusky.gnuplot ${TMPDIR}/pathdist.out
 
-# hsandv
-rm -f ${TMPDIR}/hsandv.exp ${TMPDIR}/1.exp ${TMPDIR}/1.exp ${TMPDIR}/Glad_5.exp
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o hsandv -F ${TMPDIR}/hsandv.exp
-compare ${TMPDIR}/hsandv.exp ${REFERENCE}
-#the hsandv format is too lossy to do this test :(
-#gpsbabel -i hsandv -f ${TMPDIR}/hsandv.exp -o geo -F ${TMPDIR}/1.exp
-#gpsbabel -i hsandv -f ${REFERENCE}/hsandv.exp -o geo -F ${TMPDIR}/2.exp
-#compare ${TMPDIR}/1.exp ${TMPDIR}/2.exp
-#test conversion from v4 to v5 files
-gpsbabel -i hsandv -f ${REFERENCE}/Glad_4.exp -o hsandv -F ${TMPDIR}/Glad_5.exp
-# FIXME: Can't compare directly because of potential FP rounding.
-# FIXME: compare ${TMPDIR}/Glad_5.exp reference
-
-#
-# stack filter tests
-# These don't actually test for proper behavior, for now, but they do
-# exercise all of the currently-extant filter code.
-#
-
-gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -x stack,push,copy,nowarn -x stack,push,copy -x stack,push -x stack,pop,replace -x stack,pop,append -x stack,push,copy -x stack,pop,discard -x stack,swap,depth=1 -o arc -F ${TMPDIR}/stackfilt.txt
-
 #
 # 'tabsep' isn't really tested in any non-trivial way, but we do exercise
 # it.
@@ -108,14 +41,3 @@ gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc  -o geo -F ${TMPDIR}/geocustom
 #
 gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o text -F ${TMPDIR}/text.out -o html -F ${TMPDIR}/html.out -o vcard -F ${TMPDIR}/vcard.out #-o palmdoc -F ${TMPDIR}/pd.out
 
-#
-# Map&Guide Motorrad Routenplaner .bcr files test
-#
-rm -f ${TMPDIR}/bcr*
-gpsbabel -r -i bcr -f ${REFERENCE}/route/bcr-sample.bcr -o gpx -F ${TMPDIR}/bcr-sample.gpx
-compare ${REFERENCE}/route/bcr-sample.gpx ${TMPDIR}/bcr-sample.gpx
-gpsbabel -r -i gpx -f ${REFERENCE}/route/bcr-sample.gpx -o bcr -F ${TMPDIR}/bcr-sample2.bcr
-compare ${REFERENCE}/route/bcr-sample2.bcr ${TMPDIR}/bcr-sample2.bcr
-gpsbabel -r -i bcr -f ${TMPDIR}/bcr-sample2.bcr -o gpx -F ${TMPDIR}/bcr-sample2.gpx
-compare        ${REFERENCE}/route/bcr-sample.gpx ${TMPDIR}/bcr-sample2.gpx
-
index 098d73b362b5ada715ae6b2b83c3f6eeb808ae6e..1e09fb58b3073cd58c3bcbe9070b972d4e52d031 100644 (file)
@@ -6,12 +6,6 @@
 gpsbabel -i ignrando -f ${REFERENCE}/track/ignrando-sample.rdn -o ignrando -F ${TMPDIR}/ignrando-sample.rdn
 gpsbabel -i ignrando -f ${TMPDIR}/ignrando-sample.rdn -o gpx -F ${TMPDIR}/ignrando-sample.gpx
 compare ${REFERENCE}/track/ignrando-sample.gpx ${TMPDIR}/ignrando-sample.gpx
-#
-# Microsoft AutoRoute 2002 test (read-only)
-#
-gpsbabel -i msroute -f ${REFERENCE}/route/msroute-sample.axe -o gpx -F ${TMPDIR}/msroute-sample.gpx
-compare ${REFERENCE}/route/msroute-sample.gpx ${TMPDIR}/msroute-sample.gpx
-
 
 #
 # Testing the 'nuketypes' filter is funky.
@@ -44,25 +38,6 @@ gpsbabel -t -w -i wbt-bin -f ${REFERENCE}/wbt-201.tk1 -o gpx -F ${TMPDIR}/wbt-20
 grep -v time <${TMPDIR}/wbt-201.gpx >${TMPDIR}/wbt-201.gpx2
 compare ${REFERENCE}/wbt-201.gpx ${TMPDIR}/wbt-201.gpx2
 
-
-#
-# Suunto SDF
-#
-rm -f ${TMPDIR}/stmsdf*
-gpsbabel -i garmin_txt -f ${REFERENCE}/garmin_txt.txt -t -o stmsdf -F ${TMPDIR}/stmsdf-track.sdf -r -o stmsdf,index=2 -F ${TMPDIR}/stmsdf-route.sdf
-compare ${REFERENCE}/track/stmsdf-track.sdf ${TMPDIR}/stmsdf-track.sdf
-compare ${REFERENCE}/route/stmsdf-route.sdf ${TMPDIR}/stmsdf-route.sdf
-gpsbabel -i stmsdf -f ${TMPDIR}/stmsdf-track.sdf -f ${TMPDIR}/stmsdf-route.sdf -o garmin_txt,prec=2 -F ${TMPDIR}/stmsdf.txt
-compare ${REFERENCE}/stmsdf.txt ${TMPDIR}/stmsdf.txt
-
-#
-# Digital Mapping Tracklogs
-#
-rm -f ${TMPDIR}/dmtlog*
-gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o dmtlog -F ${TMPDIR}/dmtlog-sample.trl
-gpsbabel -i dmtlog -f ${TMPDIR}/dmtlog-sample.trl -o gpx -F ${TMPDIR}/dmtlog-sample.gpx
-compare ${REFERENCE}/track/dmtlog-sample.gpx ${TMPDIR}/dmtlog-sample.gpx
-
 #
 # gzipped file i/o
 #
@@ -77,10 +52,3 @@ compare ${REFERENCE}/route/cst-sample.gpx ${TMPDIR}/cst-sample.gpx
 gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -x nuketypes,routes,tracks -x transform,rte=wpt,del=y -o gpx -F ${TMPDIR}/transform-ver.gpx
 compare ${REFERENCE}/transform-rte.gpx ${TMPDIR}/transform-ver.gpx
 
-#
-# VITO SmartMap .vtt track file 'vitovtt' test
-#
-rm -f ${TMPDIR}/vitovtt-*
-gpsbabel -i vitovtt -f ${REFERENCE}/track/vitovtt-sample.vtt -o gpx -F ${TMPDIR}/vitovtt-sample.gpx
-compare ${REFERENCE}/track/vitovtt-sample.gpx ${TMPDIR}/vitovtt-sample.gpx
-
index f62cd470223fa37576c2caa5d2ddfab6d6a5d31e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# unicsv with various grids
-#
-gpsbabel -i unicsv,utc=0 -f ${REFERENCE}/grid-swiss.csv -o gpx -F ${TMPDIR}/grid-swiss~csv.gpx
-compare ${REFERENCE}/grid-swiss~csv.gpx ${TMPDIR}/grid-swiss~csv.gpx
-gpsbabel -i gpx -f ${REFERENCE}/grid-swiss~csv.gpx -o unicsv,utc=0,grid=swiss -F ${TMPDIR}/grid-swiss.csv
-compare ${REFERENCE}/grid-swiss.csv ${TMPDIR}/grid-swiss.csv
-
-gpsbabel -i unicsv,utc=0 -f ${REFERENCE}/grid-bng.csv -o gpx -F ${TMPDIR}/grid-bng~csv.gpx
-compare ${REFERENCE}/grid-bng~csv.gpx ${TMPDIR}/grid-bng~csv.gpx
-gpsbabel -i gpx -f ${REFERENCE}/grid-bng~csv.gpx -o unicsv,utc=0,grid=bng -F ${TMPDIR}/grid-bng.csv
-compare ${REFERENCE}/grid-bng.csv ${TMPDIR}/grid-bng.csv
-
-gpsbabel -i unicsv,utc=0 -f ${REFERENCE}/grid-utm.csv -o gpx -F ${TMPDIR}/grid-utm~csv.gpx
-compare ${REFERENCE}/grid-utm~csv.gpx ${TMPDIR}/grid-utm~csv.gpx
-gpsbabel -i gpx -f ${REFERENCE}/grid-utm~csv.gpx -o unicsv,utc=0,grid=utm -F ${TMPDIR}/grid-utm.csv
-compare ${REFERENCE}/grid-utm.csv ${TMPDIR}/grid-utm.csv
-
-#
-# MGL Enigma route file (.ert)
-#
-gpsbabel -i gpx -f ${REFERENCE}/enigma.gpx -o enigma -F ${TMPDIR}/enigma.ert
-compare ${REFERENCE}/enigma-gpsb.ert ${TMPDIR}/enigma.ert
-gpsbabel -i enigma -f ${REFERENCE}/enigma-pfms.ert -o gpx -F ${TMPDIR}/enigma.gpx
-compare ${REFERENCE}/enigma.gpx ${TMPDIR}/enigma.gpx
diff --git a/gpsbabel/testo.d/dmtlog.test b/gpsbabel/testo.d/dmtlog.test
new file mode 100644 (file)
index 0000000..e19077c
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# Digital Mapping Tracklogs
+#
+rm -f ${TMPDIR}/dmtlog*
+gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o dmtlog -F ${TMPDIR}/dmtlog-sample.trl
+gpsbabel -i dmtlog -f ${TMPDIR}/dmtlog-sample.trl -o gpx -F ${TMPDIR}/dmtlog-sample.gpx
+compare ${REFERENCE}/track/dmtlog-sample.gpx ${TMPDIR}/dmtlog-sample.gpx
+
diff --git a/gpsbabel/testo.d/enigma.test b/gpsbabel/testo.d/enigma.test
new file mode 100644 (file)
index 0000000..3497127
--- /dev/null
@@ -0,0 +1,8 @@
+
+#
+# MGL Enigma route file (.ert)
+#
+gpsbabel -i gpx -f ${REFERENCE}/enigma.gpx -o enigma -F ${TMPDIR}/enigma.ert
+compare ${REFERENCE}/enigma-gpsb.ert ${TMPDIR}/enigma.ert
+gpsbabel -i enigma -f ${REFERENCE}/enigma-pfms.ert -o gpx -F ${TMPDIR}/enigma.gpx
+compare ${REFERENCE}/enigma.gpx ${TMPDIR}/enigma.gpx
diff --git a/gpsbabel/testo.d/gpspilot.test b/gpsbabel/testo.d/gpspilot.test
new file mode 100644 (file)
index 0000000..09b6f2f
--- /dev/null
@@ -0,0 +1,9 @@
+# GPSPilot Tracker for PalmOS
+# This test is eerily similar to the NAV Companion test.  In fact, the 
+# converted reference file (magnavr.gpu) is identical.
+rm -f ${TMPDIR}/gpspilot.pdb ${TMPDIR}/gpspilot.gpu ${TMPDIR}/gpspil_t.gpu
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpspilot -F ${TMPDIR}/gpspilot.pdb
+gpsbabel -i gpspilot -f ${TMPDIR}/gpspilot.pdb -o gpsutil -F ${TMPDIR}/gpspilot.gpu
+gpsbabel -i gpspilot -f ${REFERENCE}/gpspilot.pdb -o gpsutil -F ${TMPDIR}/gpspil_t.gpu
+compare ${TMPDIR}/gpspil_t.gpu ${TMPDIR}/gpspilot.gpu
+compare ${REFERENCE}/gu.wpt ${TMPDIR}/gpspilot.gpu
diff --git a/gpsbabel/testo.d/holux.test b/gpsbabel/testo.d/holux.test
new file mode 100644 (file)
index 0000000..61e4627
--- /dev/null
@@ -0,0 +1,8 @@
+
+# Holux support is a little funky to test.  Becuase it loses precision,
+# if we convert it to another format, we lose accuracy (rounding) in the
+# coords, so converting it so something else and comparing it never works.
+# So we verify that we can read the reference and write it and get an
+# identical reference.
+gpsbabel -i holux -f ${REFERENCE}/paris.wpo -o holux -F ${TMPDIR}/paris.wpo
+# compare ${REFERENCE}/paris.wpo ${TMPDIR}/paris.wpo
diff --git a/gpsbabel/testo.d/hsandv.test b/gpsbabel/testo.d/hsandv.test
new file mode 100644 (file)
index 0000000..a8b4360
--- /dev/null
@@ -0,0 +1,12 @@
+# hsandv
+rm -f ${TMPDIR}/hsandv.exp ${TMPDIR}/1.exp ${TMPDIR}/1.exp ${TMPDIR}/Glad_5.exp
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o hsandv -F ${TMPDIR}/hsandv.exp
+compare ${TMPDIR}/hsandv.exp ${REFERENCE}
+#the hsandv format is too lossy to do this test :(
+#gpsbabel -i hsandv -f ${TMPDIR}/hsandv.exp -o geo -F ${TMPDIR}/1.exp
+#gpsbabel -i hsandv -f ${REFERENCE}/hsandv.exp -o geo -F ${TMPDIR}/2.exp
+#compare ${TMPDIR}/1.exp ${TMPDIR}/2.exp
+#test conversion from v4 to v5 files
+gpsbabel -i hsandv -f ${REFERENCE}/Glad_4.exp -o hsandv -F ${TMPDIR}/Glad_5.exp
+# FIXME: Can't compare directly because of potential FP rounding.
+# FIXME: compare ${TMPDIR}/Glad_5.exp reference
diff --git a/gpsbabel/testo.d/magellan_sd.test b/gpsbabel/testo.d/magellan_sd.test
new file mode 100644 (file)
index 0000000..db472d5
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# magellan SD card waypoint / route format
+#
+rm -f ${TMPDIR}/magellan.rte
+gpsbabel -r -i magellan -f ${REFERENCE}/route/magellan.rte -o magellan \
+         -F ${TMPDIR}/magellan.rte
+compare ${REFERENCE}/route/magellan.rte ${TMPDIR}/magellan.rte
+
index 35ca500529a8240ddc6b4a8d28a56aa7bfe4f9ad..a4a320c3388651af4a30739ecc37feac42ec2301 100644 (file)
@@ -3,3 +3,20 @@ rm -f ${TMPDIR}/mm.mapsend ${TMPDIR}/mm.gps
 gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o mapsend -F ${TMPDIR}/mm.mapsend
 gpsbabel -i mapsend -f ${TMPDIR}/mm.mapsend -o gpsutil -F ${TMPDIR}/mm.gps
 compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt
+
+#
+# MAPSEND waypoint / route format
+#
+rm -f ${TMPDIR}/route.mapsend
+gpsbabel -r -i mapsend -f ${REFERENCE}/route/route.mapsend -o mapsend \
+         -F ${TMPDIR}/route.mapsend
+bincompare ${TMPDIR}/route.mapsend ${REFERENCE}/route/route.mapsend
+
+#
+# MAPSEND track format 
+#
+rm -f ${TMPDIR}/mapsend.trk
+gpsbabel -t -i mapsend -f ${REFERENCE}/track/mapsend.trk -o mapsend,trkver=3 \
+         -F ${TMPDIR}/mapsend.trk
+compare ${TMPDIR}/mapsend.trk ${REFERENCE}/track/
+
diff --git a/gpsbabel/testo.d/mapsource.test b/gpsbabel/testo.d/mapsource.test
new file mode 100644 (file)
index 0000000..10519cf
--- /dev/null
@@ -0,0 +1,41 @@
+
+# Garmin Mapsource This is a binary format with some undocumented
+# fields.  This test is therefore intentionally vague.  We read a file,
+# convert it to GPX, then write a file as MPS, then read it back and
+# write it as GPX and compare them.  Since we're writing both GPX files
+# ourselves from the same version, we're immune to changes in our own
+# GPX output.
+
+rm -fr ${TMPDIR}/ms.gpx ${TMPDIR}/ms[12].gpx
+gpsbabel -i mapsource -f ${REFERENCE}/mapsource.mps  -o gpx -F ${TMPDIR}/ms1.gpx
+gpsbabel -i mapsource -f ${REFERENCE}/mapsource.mps  -o mapsource -F ${TMPDIR}/ms.mps
+gpsbabel -i mapsource -f ${TMPDIR}/ms.mps -o gpx -F ${TMPDIR}/ms2.gpx
+compare ${TMPDIR}/ms1.gpx ${TMPDIR}/ms2.gpx
+
+#
+# MRCB mapsource track test
+#
+rm -f ${TMPDIR}/mps-track.mps
+gpsbabel -t -i mapsource -f ${REFERENCE}/track/mps-track.mps -o mapsource,mpsverout=3 \
+         -F ${TMPDIR}/mps-track.mps
+compare ${TMPDIR}/mps-track.mps ${REFERENCE}/track
+
+# Now do a test of reading waypoints from a track-only file - should have an empty result
+rm -f ${TMPDIR}/mps-track.mps
+gpsbabel -i mapsource -f ${REFERENCE}/track/mps-track.mps -o mapsource,mpsverout=3 \
+         -F ${TMPDIR}/mps-track.mps
+compare ${REFERENCE}/mps-empty.mps ${TMPDIR}/mps-track.mps
+
+#
+# MRCB mapsource route test
+#
+rm -f ${TMPDIR}/mps-route.mps
+gpsbabel -r -i mapsource -f ${REFERENCE}/route/route.mps -o mapsource,mpsverout=4 \
+         -F ${TMPDIR}/mps-route.mps
+compare ${REFERENCE}/route/route.mps ${TMPDIR}/mps-route.mps
+
+# Now do a test of reading tracks from a route-only file - should have an empty result
+rm -f ${TMPDIR}/mps-route.mps
+gpsbabel -t -i mapsource -f ${REFERENCE}/route/route.mps -o mapsource,mpsverout=3 \
+         -F ${TMPDIR}/mps-route.mps
+compare ${REFERENCE}/mps-empty.mps ${TMPDIR}/mps-route.mps
diff --git a/gpsbabel/testo.d/msroute.test b/gpsbabel/testo.d/msroute.test
new file mode 100644 (file)
index 0000000..4236b92
--- /dev/null
@@ -0,0 +1,6 @@
+#
+# Microsoft AutoRoute 2002 test (read-only)
+#
+gpsbabel -i msroute -f ${REFERENCE}/route/msroute-sample.axe -o gpx -F ${TMPDIR}/msroute-sample.gpx
+compare ${REFERENCE}/route/msroute-sample.gpx ${TMPDIR}/msroute-sample.gpx
+
diff --git a/gpsbabel/testo.d/route_reverse.test b/gpsbabel/testo.d/route_reverse.test
new file mode 100644 (file)
index 0000000..ee692bc
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Route reversal filter.   Do it twice and be sure we get what we
+# started with.
+#
+rm -f ${TMPDIR}/reverse1.arc ${TMPDIR}/reverse2.arc ${TMPDIR}/reference.arc
+gpsbabel -r -i gpx -f ${REFERENCE}/route/route.gpx \
+         -o arc -F ${TMPDIR}/reference.arc
+gpsbabel -r -i gpx -f ${REFERENCE}/route/route.gpx \
+         -x reverse \
+         -o arc -F ${TMPDIR}/reverse1.arc
+gpsbabel -r -i gpx -f ${REFERENCE}/route/route.gpx \
+         -x reverse \
+         -x reverse \
+         -o arc -F ${TMPDIR}/reverse2.arc
+# Verify the first and last are the same
+compare ${TMPDIR}/reference.arc  ${TMPDIR}/reverse2.arc
+# Verify the first and second are different.
+#${DIFF}  ${TMPDIR}/reverse1.arc  ${TMPDIR}/reverse2.arc > /dev/null && {
+#              echo ERROR Failed reversal test.
+#              exit 1
+#}
+
+# parkrrrr: This isn't a straightforward compare; we *want* it to fail.
+# Obviously this test should just be rewritten with a new reference.
+#compare  ${TMPDIR}/reverse1.arc  ${TMPDIR}/reverse2.arc
+
diff --git a/gpsbabel/testo.d/stackfilter.test b/gpsbabel/testo.d/stackfilter.test
new file mode 100644 (file)
index 0000000..bc25122
--- /dev/null
@@ -0,0 +1,9 @@
+
+#
+# stack filter tests
+# These don't actually test for proper behavior, for now, but they do
+# exercise all of the currently-extant filter code.
+#
+
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -x stack,push,copy,nowarn -x stack,push,copy -x stack,push -x stack,pop,replace -x stack,pop,append -x stack,push,copy -x stack,pop,discard -x stack,swap,depth=1 -o arc -F ${TMPDIR}/stackfilt.txt
+
diff --git a/gpsbabel/testo.d/stmsdf.test b/gpsbabel/testo.d/stmsdf.test
new file mode 100644 (file)
index 0000000..fa17411
--- /dev/null
@@ -0,0 +1,11 @@
+
+#
+# Suunto SDF
+#
+rm -f ${TMPDIR}/stmsdf*
+gpsbabel -i garmin_txt -f ${REFERENCE}/garmin_txt.txt -t -o stmsdf -F ${TMPDIR}/stmsdf-track.sdf -r -o stmsdf,index=2 -F ${TMPDIR}/stmsdf-route.sdf
+compare ${REFERENCE}/track/stmsdf-track.sdf ${TMPDIR}/stmsdf-track.sdf
+compare ${REFERENCE}/route/stmsdf-route.sdf ${TMPDIR}/stmsdf-route.sdf
+gpsbabel -i stmsdf -f ${TMPDIR}/stmsdf-track.sdf -f ${TMPDIR}/stmsdf-route.sdf -o garmin_txt,prec=2 -F ${TMPDIR}/stmsdf.txt
+compare ${REFERENCE}/stmsdf.txt ${TMPDIR}/stmsdf.txt
+
diff --git a/gpsbabel/testo.d/tpg.test b/gpsbabel/testo.d/tpg.test
new file mode 100644 (file)
index 0000000..312ea46
--- /dev/null
@@ -0,0 +1,11 @@
+
+# TPG (NG Topo!) file format
+# This is hard to test as the datum conversions create minute
+# inconsistencies in the coordinates.  So..  we test our i/o 
+# against a format that rounds higher than we care to compare
+# for binary data. 
+rm -f ${TMPDIR}/topo.mxf ${TMPDIR}/tpg.mxf ${TMPDIR}/geo.tpg
+gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o tpg -F ${TMPDIR}/geo.tpg
+gpsbabel -i tpg -f ${TMPDIR}/geo.tpg -o mxf -F ${TMPDIR}/tpg.mxf
+gpsbabel -i tpg -f ${REFERENCE}/tpg.tpg -o mxf -F ${TMPDIR}/topo.mxf
+compare ${TMPDIR}/tpg.mxf ${TMPDIR}/topo.mxf
diff --git a/gpsbabel/testo.d/unicsv_grids.test b/gpsbabel/testo.d/unicsv_grids.test
new file mode 100644 (file)
index 0000000..22e0851
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# unicsv with various grids
+#
+gpsbabel -i unicsv,utc=0 -f ${REFERENCE}/grid-swiss.csv -o gpx -F ${TMPDIR}/grid-swiss~csv.gpx
+compare ${REFERENCE}/grid-swiss~csv.gpx ${TMPDIR}/grid-swiss~csv.gpx
+gpsbabel -i gpx -f ${REFERENCE}/grid-swiss~csv.gpx -o unicsv,utc=0,grid=swiss -F ${TMPDIR}/grid-swiss.csv
+compare ${REFERENCE}/grid-swiss.csv ${TMPDIR}/grid-swiss.csv
+
+gpsbabel -i unicsv,utc=0 -f ${REFERENCE}/grid-bng.csv -o gpx -F ${TMPDIR}/grid-bng~csv.gpx
+compare ${REFERENCE}/grid-bng~csv.gpx ${TMPDIR}/grid-bng~csv.gpx
+gpsbabel -i gpx -f ${REFERENCE}/grid-bng~csv.gpx -o unicsv,utc=0,grid=bng -F ${TMPDIR}/grid-bng.csv
+compare ${REFERENCE}/grid-bng.csv ${TMPDIR}/grid-bng.csv
+
+gpsbabel -i unicsv,utc=0 -f ${REFERENCE}/grid-utm.csv -o gpx -F ${TMPDIR}/grid-utm~csv.gpx
+compare ${REFERENCE}/grid-utm~csv.gpx ${TMPDIR}/grid-utm~csv.gpx
+gpsbabel -i gpx -f ${REFERENCE}/grid-utm~csv.gpx -o unicsv,utc=0,grid=utm -F ${TMPDIR}/grid-utm.csv
+compare ${REFERENCE}/grid-utm.csv ${TMPDIR}/grid-utm.csv
diff --git a/gpsbabel/testo.d/xmapwpt.test b/gpsbabel/testo.d/xmapwpt.test
new file mode 100644 (file)
index 0000000..80fdbb1
--- /dev/null
@@ -0,0 +1,6 @@
+
+# XMapHH Street Atlas USA file format
+rm -f ${TMPDIR}/xmapwpt.wpt ${TMPDIR}/xmapwpt.xmapwpt
+gpsbabel -i xmapwpt -f ${REFERENCE}/xmapwpt.wpt -o xmapwpt -F ${TMPDIR}/xmapwpt.xmapwpt
+gpsbabel -i xmapwpt -f ${TMPDIR}/xmapwpt.xmapwpt -o xmapwpt -F ${TMPDIR}/xmapwpt.wpt
+compare ${TMPDIR}/xmapwpt.wpt ${REFERENCE}